package or.exa.cangguan.mapper;

import io.swagger.models.auth.In;
import or.exa.cangguan.common.Page;
import or.exa.cangguan.entity.dto.OutStoreDto;
import or.exa.cangguan.entity.po.OutStore;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface OutStoreMapper {
    int deleteByPrimaryKey(Integer id);

    Integer selectStoreById(@Param("id") Integer id);

    int insert(OutStore record);

    int insertSelective(OutStore record);

    OutStore selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OutStore record);

    String selectStatus(@Param("id") Integer id);

    int updateByPrimaryKey(OutStore record);

    // 查询出库单列表
    List<OutStoreDto> selectOutStore(@Param("storeId") Integer storeId,
                                    @Param("outNumber") String outNumber,
                                    @Param("outPlanTime") Date outPlanTime,
                                     @Param("page") Page page);

    // 查询出库单总数
    Integer selectOutStoreCount(@Param("storeId") Integer storeId,
                               @Param("outNumber") String outNumber,
                               @Param("outPlanTime") Date outPlanTime);

    // 更新出库状态
    int updateOutStatus(@Param("id") Integer id,
                       @Param("status") String status,
                       @Param("outPlanTime") Date outPlanTime);
}